<template>
    <div class="wrapper">
       <div class="deng">
            <el-input placeholder="请输入内容"
            @input="(val)=>$emit('input,val')"
            :value='value'
            class="input"
       
             >
                 <el-button 
                 :loading="loading"
                 :value="value"
                 @click="$emit('search')"
                 slot="append" 
                 icon="el-icon-search"></el-button>
            </el-input>
            <el-button type="primary" @click="$emit('click')" v-if="$slots.default">
            <slot></slot>
            </el-button>
        </div>
    </div>
</template>

<script>
    export default {
        name:'Search',
      
        props:{
            /**
             * 搜索区的值
             */
            value:String,
           /**
            * loading
            */
            loading:Boolean
        }
    }
</script>

<style lang="scss" scoped>
.wrapper{
    margin-bottom: 15px;
    .input{
    width: 400px;
    margin-right: 20px;
}
}

</style>